﻿//comment
// songokuhghhgh
using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;
using Server.Logic;
using Server.Data;

namespace Server
{
	[ServiceBehavior(
	 ConcurrencyMode = ConcurrencyMode.Single,
	 InstanceContextMode = InstanceContextMode.Single)]
	public partial class ChauLuc : IUserMgt, IPaymentMgt, IReceiptMgt, IRiskVoucherMgt, ILadingVoucherMgt
	{

		IEnumerable<Database.Payment> IPaymentMgt.Search(string keyword, DateTime fromdate, DateTime todate, Pagination pagi)
		{
			throw new NotImplementedException();
		}

		void IPaymentMgt.Create(Payment voucher)
		{
			throw new NotImplementedException();
		}

		void IPaymentMgt.Update(Payment voucher)
		{
			throw new NotImplementedException();
		}

		void IPaymentMgt.Remove(string voucherID)
		{
			throw new NotImplementedException();
		}

		IEnumerable<LaddingReceipt> IReceiptMgt.Search(string keyword, DateTime fromdate, DateTime todate, Pagination pagi)
		{
			throw new NotImplementedException();
		}

		void IReceiptMgt.Create(LaddingReceipt voucher)
		{
			throw new NotImplementedException();
		}

		void IReceiptMgt.Update(LaddingReceipt voucher)
		{
			throw new NotImplementedException();
		}

		void IReceiptMgt.Remove(string voucherID)
		{
			throw new NotImplementedException();
		}

		IEnumerable<RiskVoucher> IRiskVoucherMgt.Search(string keyword, DateTime fromdate, DateTime todate, Pagination pagi)
		{
			throw new NotImplementedException();
		}

		void IRiskVoucherMgt.Create(RiskVoucher voucher)
		{
			throw new NotImplementedException();
		}

		void IRiskVoucherMgt.Update(RiskVoucher voucher)
		{
			throw new NotImplementedException();
		}

		void IRiskVoucherMgt.Remove(string voucherID)
		{
			throw new NotImplementedException();
		}

		IEnumerable<LaddingVoucher> ILadingVoucherMgt.Search(string keyword, DateTime fromdate, DateTime todate, Pagination pagi)
		{
			throw new NotImplementedException();
		}

		void ILadingVoucherMgt.Create(LaddingVoucher voucher)
		{
			throw new NotImplementedException();
		}

		void ILadingVoucherMgt.Update(LaddingVoucher voucher)
		{
			throw new NotImplementedException();
		}

		void ILadingVoucherMgt.Remove(string voucherID)
		{
			throw new NotImplementedException();
		}


		private IDbConnection connection;
		public ChauLuc(IDbConnection connection)
		{
			this.connection = connection;
		}

		void IUserMgt.Login(string username, string password)
		{

	

			connection.Open();
			var cmd = connection.CreateCommand();
			cmd.CommandType = CommandType.StoredProcedure;

			DbParameterHelper.AddParam(cmd, "str", "thanh");

			cmd.CommandText = "GetOne";
			var ret = cmd.ExecuteScalar();

			connection.Close();
		}

		User IUserMgt.GetInfo(string username)
		{
			throw new NotImplementedException();
		}

		void IUserMgt.Update(Database.User user)
		{
			throw new NotImplementedException();
		}

		void IUserMgt.Remove(Database.User user)
		{
			throw new NotImplementedException();
		}

		IEnumerable<Database.User> IUserMgt.Search(string keyword, Pagination pagi)
		{
			throw new NotImplementedException();
		}

		void IUserMgt.Logout()
		{
			throw new NotImplementedException();
		}
	}
}
